import { createRouter, createWebHistory, RouteRecordRaw } from 'vue-router'
import zhineng from '../pages/zhineng/zhineng.vue'
import jiuye from '../pages/jiuye/jiuye.vue'
import anfang from '../pages/anfang/anfang.vue'
import shebei from '../pages/shebei/shebei.vue'

const routes: Array<RouteRecordRaw> = [
    {
        path: '/',
        name: 'zhineng',
        component: zhineng
    },

    {
        path: '/jiuye',
        name: 'jiuye',
        component: jiuye
    },
    {
        path: '/anfang',
        name: 'anfang',
        component: anfang
    },
    {
        path: '/shebei',
        name: 'shebei',
        component: shebei
    }
];

const router = createRouter({
    history: createWebHistory(),
    routes
});
router.beforeEach((to, from, next) => {
    console.log('Navigating to:', to.path);
    next();
  });

export default router;